CREATE TABLE jms_dm.dm_mng_explosion_warehouse_network_punish_dt
(
    final_sign_network_code varchar(100) comment '派件网点编码',
    end_agent_code          varchar(100) comment '所属代理区编码',
    end_provider_id         varchar(100) comment '所属省份id',
    virt_code               varchar(100) comment '虚拟代理区code',
    final_sign_network_name varchar(100) comment '派件网点名称',
    end_agent_name          varchar(100) comment '所属代理区名称',
    end_provider_name       varchar(100) comment '所属省份名称',
    need_sign_count_1d      int comment '1天应签收',
    retention_count_1d      int comment '1天内滞留',
    need_sign_count_2d      int comment '2天应签收',
    retention_count_2d      int comment '2天内滞留',
    need_sign_count_3d      int comment '3天应签收',
    retention_count_3d      int comment '3天内滞留',
    need_sign_count_5d      int comment '5天应签收',
    retention_count_5d      int comment '5天内滞留',
    need_sign_count_7d      int comment '7天应签收',
    retention_count_7d      int comment '7天内滞留',
    scan_sum                int comment '时效签收量 揽签分布汇总表',
    final_plan_sign_date    varchar(100) comment '规划签收日期',
    need_sign_count         int comment '零班票量 时效应签收量新末端签收汇总表(规划签收)',
    staff_code              varchar(100) comment '员工编码',
    staff_name              varchar(100) comment '员工名称',
    position_name           varchar(100) comment '岗位名称.',
    virt_name               varchar(100) comment '虚拟代理区name',
    date_time               date comment '日期,分区'
) ENGINE = OLAP DUPLICATE KEY(final_sign_network_code,end_agent_code, end_provider_id, virt_code)
COMMENT "爆仓处罚报表结果表"
PARTITION BY RANGE(date_time)
(START ("2023-02-01") END ("2023-03-10") EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(`final_sign_network_code`) BUCKETS 1
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-180",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "1",
"in_memory" = "false",
"storage_format" = "V2"
);

